import Vue from 'vue'
import element from 'element-ui'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets

import './styles/element-variables.scss'
import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'
import echarts from 'echarts'
import VeLine from 'v-charts/lib/line.common'

import './icons' // icon
import './permission' // permission control
import './utils/error-log' // error log

import * as filters from './filters' // global filters
import AccountId from './components/AccountId'
import imageTooltip from './components/ImageTooltip'
import tooptipsCom from './components/Tooltip/index.js'
import GlobalMixin from '@/mixins/global'
// Vue.prototype.$ELEMENT = {
//   size: 'small'
// }
import Video from 'video.js'
import 'video.js/dist/video-js.css'

Vue.prototype.$video = Video
Vue.use(element, {
  size: 'small' // set element-ui default size
})
Vue.use(tooptipsCom)
Vue.use(imageTooltip)
Vue.use(AccountId)
Vue.component(VeLine.name, VeLine)

// register global utility filters
Object.keys(filters).forEach(key => {
  console.log("key:" + key)
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false
Vue.mixin(GlobalMixin)

Vue.prototype.$echarts = echarts

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
